<%@ include file="/taglibs.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>
	<title>北京邮电大学学生党员在线学习中心</title>
	
	
	<script type="text/javascript">
	String.prototype.trim = function()
	{
	  return this.replace(/(^\s*)|(\s*$)/g, "");
	}
	
	function check() {
		   var userId = document.form1.userId.value.toString();
		   var userNewPassword = document.form1.userNewPassword.value.toString();
		   var userNewPassword2 = document.form1.userNewPassword2.value.toString();
		   var userstatus = document.form1.userstatus.value.toString();
 	   
		   if(userId.trim().length == 0) {
		       alert('请输入用户账号！');
		       document.form1.userId.focus();
		       return false;
		       
		   } else if(userstatus == 0) {
		       alert('请选择用户类别!');
		       document.form1.userstatus.focus();
		       return false;
		        
		   }else if(userNewPassword.trim().length == 0) {
		       alert('请输入新密码！');
		       document.form1.userNewPassword.focus();
		       return false;
		        
		   }else if(userNewPassword.length>20){
			   alert('新密码长度不能超过20!');
		       document.form1.userNewPassword.focus();
		       return false;
		   }else if(userNewPassword2.trim().length == 0) {
		       alert('请再次输入新密码！');
		       document.form1.userNewPassword2.focus();
		       return false;
		        
		   } else if(userNewPassword!=(userNewPassword2)) {
		       alert('两次输入的新密码不一致！');
		       document.form1.userNewPassword2.focus();
		       return false;
		   } 
	
		}
				
	
	</script>
	
	
</head>
<div id="nav_bar">
    <img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt=""/>
    <div id="welcome_label">欢迎您，&nbsp;<s:property value="#session.session_user.adminName" />!</div>
    <img id="nav_bar_seperator" src="../../../styles/nav_bar_seperator.png" alt=""/>
    <div id="nav_location">
        <img id="nav_bar_point" src="../../../styles/nav_bar_point.png" alt="" />
        <div id="nav_cur_location">当前位置：&nbsp;<a href="${ctx}/AdminAction_manageUser" >用户管理</a>&nbsp;&nbsp;>&nbsp;&nbsp;<span style="color:black;">用户密码重置</span></div>
    </div>
    <img style="float:right; width:5px;" src="../../../styles/nav_bar_right.png" alt=""/>
    <a id="nav_logout" href="${ctx}/logoutAction_adminLogout">[安全退出]</a>
</div>
<div style="clear:both; height:5px;">&nbsp;</div>

<div style="min-height:450px;">
	<div id="side_menu" >
	    <div id="side_menu_title">
	        <img src="../../../styles/side_menu_title_img.png" alt="" />
	        <span>用户管理</span>
	    </div>
	    <div id="side_menu_title_bottom">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="AdminAction_memberList">成员信息维护</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="AdminAction_addStudent">新增学生用户</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu_focus">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="AdminAction_resetUserPassword">用户密码重置</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <s:if test="#session.level == 2 || #session.level == 3">
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="AdminAction_addAdministrator">新增管理员用户</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="AdminAction_adminList">管理员信息维护</a>
	    </div>
	    </s:if>
	</div>
	
	<div id="main_content">
	    <div id="main_content_title">
	        <img src="../../../styles/content_title_img.png" alt="" />
	        <span>用户密码重置</span>
	    </div>
	    <div class="main_content_title_bottom">&nbsp;</div>

		<form action="AdminAction_save_resetUserPassword" name="form1" method="post"  onsubmit="return check();">
		<table id="table" class="page_table" cellspacing="0" cellpadding="0" >
		<tr>
			<td class="leftTD">用户账号:
			</td>
			<td class="rightTD"><input type="text"  id="userId"   name="userId"  value=""  /><font color="red">*</font></td>
		</tr>
		<tr>
			<td class="leftTD2">用户类别:
			</td>
			<td class="rightTD">
				<select name="userstatus"  style="width:114px;">
				    <option value="0">请选择</option>
		            <option value="1">学生</option>
		            <option value="2">管理员</option>
		        </select>	
			</td>
		</tr>
		<tr>
			<td class="leftTD">新密码:</td>
			<td class="rightTD"><input type="password"  id="userNewPassword" name="userNewPassword"  value=""  /><font color="red">*</font></td>
		</tr>
		<tr>
			<td class="leftTD2">再次输入新密码:</td>
			<td class="rightTD"><input type="password"  id="userNewPassword2" name="userNewPassword2"  value=""  /><font color="red">*</font></td>
		</tr>
		</table>
		<div style="clear:both; height:5px;"></div>
		<div style="text-align:center; width:90%;">
			<input type="submit"  name="submit" id="submit" class="input-button" value="提交"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="reset"  name="reset" id="button" class="input-button"  value="重置"/>
		</div>
		</form>
	</div>
	
</div>



